import instance from "@/services/axios";


/**
 * 根据人员ID获取人员信息
 * @param {*} param 
 */
export async function getPersonnelInformationList(host) {
    const { message, msg } = await instance.post(`${host}/getPersonnelInformationList`);
    return { message , msg };
}


/**
 * 柜子列表
 * @param {*} param 
 */
export async function getCabinetList(host) {
    const { message, msg } = await instance.post(`${host}/getCabinetList`);
    return { message , msg };
}



/**
 * 远程开门
 * @param {*} param 
 */
export async function RemoteDoorOpening(host , param = { boxNum , userName}) {
    const { message, msg } = await instance.post(`${host}/RemoteDoorOpening`, param);
    return { message , msg };
}




/**
 * 释放格子
 * @param {*} param 
 */
export async function ReleaseLattice(host , param = { boxNum }) {
    const { message, msg } = await instance.post(`${host}/ReleaseLattice`, param);
    return { message , msg };
}



export default {
    getPersonnelInformationList,
    getCabinetList,
    RemoteDoorOpening,
    ReleaseLattice,
};